﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;
using System.Data;

namespace logic
{
    public class recipeCategory
    {
        public static void insert(RecipeCategoryEntity recipeCategory)
        {
            RecipeCategory.insert(recipeCategory);
        }

        public static void update(RecipeCategoryEntity recipeCategory)
        {
            RecipeCategory.update(recipeCategory);
        }

        public static void delete(int rcid)
        {
            RecipeCategory.delete(rcid);
        }

        public static RecipeCategoryEntity getById(int rcid)
        {
            return RecipeCategory.getById(rcid);
        }
        public static DataSet select(string where, string orderby, int pagesize, int pageindex)
        {
            return DAL.DbHelper.ExecuteDataSetPageSize("*", "vw_RecipeCategory_list", where, "rcid", orderby, pagesize, pageindex);
        }
        // 前台我的菜谱类别列表
        public static DataTable select(int companyId)
        {
            return DbHelper.ExecuteDataTable("p_RecipeCategory_Diy_List", companyId);
        }
        // 前台系统菜谱
        public static DataTable select()
        {
            return DbHelper.ExecuteDataTable("p_RecipeCategory_System_List");
        }
    }
}